package cn.wj.school.cloud.utils;
import java.io.*;

public class CommonUtils {

    public static void genFile(String basePath, String content){
        FileOutputStream fos = null;
        try {
            File file = new File(basePath);
            fos = new FileOutputStream(file);
            Writer os = new OutputStreamWriter(fos, "utf-8");
            os.write(content);
            os.flush();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (null != fos) {
                    fos.close();
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}